{{#if scope.currentCluster.isReady}}
  {{#banner-message color="bg-warning"}}
    <p>{{t 'banner.cis' dashboardLink=scope.dashboardLink docsBase=scope.docsBase htmlSafe=true}}</p>
  {{/banner-message}}
{{/if}}

<section class="header clearfix">
  <h1>{{t 'cis.scan.header'}}</h1>
</section>
{{#if isRKE}}
  <section>
    {{#sortable-table
        tableClassNames="bordered"
        bulkActions=true
        bulkActionHandler=bulkActionHandler
        descending=descending
        paging=false
        search=true
        sortBy=sortBy
        headers=tableHeaders
        body=clusterScans
        rightActions=true
        as |sortable kind scan dt|
    }}
      {{#if (eq kind "row")}}
        <Cluster::Cis::Scan::TableRow @model={{scan}} />
      {{else if (eq kind "norows")}}
        <tr>
          <td colspan="{{sortable.fullColspan}}" class="text-center text-muted pt-20 pb-20">{{t 'cis.scan.table.empty'}}</td>
        </tr>
      {{else if (eq kind "right-actions")}}
        <button style="margin-left: -5px;" class="btn btn-sm bg-secondary pl-40 pr-40 mr-5" disabled={{scope.currentCluster.isAddClusterScanScheduleDisabled}} type="button" {{action "setSchedule"}}>
          {{t 'cis.scan.actions.addSchedule'}}
        </button>
        <button style="margin-left: -5px;" class="btn btn-sm bg-secondary pl-40 pr-40 mr-5" disabled={{scope.currentCluster.isClusterScanDown}} type="button" {{action "setAlert"}}>
          {{t 'cis.scan.actions.addAlert'}}
        </button>
        <button style="margin-left: -5px;" class="btn btn-sm bg-primary pl-40 pr-40" disabled={{scope.currentCluster.isClusterScanDisabled}} type="button" {{action "runScan"}}>
          {{t 'cis.scan.actions.runScan'}}
        </button>
      {{/if}}
    {{/sortable-table}}
  </section>
{{else}}
  <div class="row">
    <div class="banner bg-info">
      <div class="banner-icon"><i class="icon icon-info"></i></div>
      <div class="banner-message pt-10 pb-10">{{t 'cis.scan.rkeOnly'}}</div>
    </div>
  </div>
{{/if}}
